package com.belarus.kamianiec.photo.photoSite.web.inner;

import org.zkoss.bind.BindUtils;
import org.zkoss.bind.annotation.NotifyChange;

public class MainAppVm {

	private String title;
	private String part1;
	private String image1Src;
	private String part2;
	private String image2Src;
	private String bottom;

	private final static String titleName = "title";
	private final static String part1Name = "part1";
	private final static String image1SrcName = "image1Src";
	private final static String part2Name = "part2";
	private final static String image2SrcName = "image2Src";
	private final static String bottomName = "bottom";

	public MainAppVm() {
		// TODO initialize from the DB 
		title = "FOTAIMGNIENNIE";
		part1 = "testing.....";
		image1Src = "/images/mainApp/img1.png";
		part2 = "testing.....";
		image2Src = "/images/mainApp/img2.png";
		bottom = "We are always welcome!";
	}

	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param title
	 *            the title to set
	 */
	@NotifyChange(titleName)
	public void setTitle(String title) {
		this.title = title;
		BindUtils.postNotifyChange(null, null, this, titleName);
	}

	/**
	 * @return the part1
	 */
	public String getPart1() {
		return part1;
	}

	/**
	 * @param part1
	 *            the part1 to set
	 */
	@NotifyChange(part1Name)
	public void setPart1(String part1) {
		this.part1 = part1;
		BindUtils.postNotifyChange(null, null, this, part1Name);
	}

	/**
	 * @return the image1Src
	 */
	public String getImage1Src() {
		return image1Src;
	}

	/**
	 * @param image1Src
	 *            the image1Src to set
	 */
	@NotifyChange(image1SrcName)
	public void setImage1Src(String image1Src) {
		this.image1Src = image1Src;
		BindUtils.postNotifyChange(null, null, this, image1Src);
	}

	/**
	 * @return the part2
	 */
	public String getPart2() {
		return part2;
	}

	/**
	 * @param part2
	 *            the part2 to set
	 */
	@NotifyChange(part2Name)
	public void setPart2(String part2) {
		this.part2 = part2;
		BindUtils.postNotifyChange(null, null, this, part2Name);
	}

	/**
	 * @return the image2Src
	 */
	public String getImage2Src() {
		return image2Src;
	}

	/**
	 * @param image2Src
	 *            the image2Src to set
	 */
	@NotifyChange(image2SrcName)
	public void setImage2Src(String image2Src) {
		this.image2Src = image2Src;
		BindUtils.postNotifyChange(null, null, this, image2SrcName);
	}

	/**
	 * @return the bottom
	 */
	public String getBottom() {
		return bottom;
	}

	/**
	 * @param bottom
	 *            the bottom to set
	 */
	@NotifyChange(bottomName)
	public void setBottom(String bottom) {
		this.bottom = bottom;
		BindUtils.postNotifyChange(null, null, this, bottomName);
	}
}
